[EuiDataGrid] Update virtualizationOptions to respect onItemsRendered and className#6019
Conversation
…Name` props - there were previously getting overriden by our own prop settings, but should allow being merged
|
@alexwizp I believe this should satisfy your use case - Please let me know if not! :) |
virtualizationProps to respect onItemsRendered and classNamevirtualizationOptions to respect onItemsRendered and className
f8ba96d to
105d090
Compare
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6019/ |
- to make it clear which prop(s) EuiDataGrid sets internally and will not allow overriding of
105d090 to
9827c1c
Compare
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6019/ |
chandlerprall
left a comment
There was a problem hiding this comment.
Pulled & tested locally to ensure supported virtualizationOptions options were still applied. Everything checks out 👍
This reverts commit 9827c1c.
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6019/ |
|
@constancecchen thanks, but I see this callback doesn't happen on if we refresh table and data doesn't changed. I understand that this is absolutely true from an optimisation perspective but it makes impossible for us to use this callback 😢 |
Sorry, I'm not totally clear on what "refresh table" means. Are you completely unmounting and remounting the data grid via the Also, having this convo in a closed PR may not make a lot of sense, so feel free to re-open #6002 and continue the discussion there! 🙂 |
Summary
closes #6002
This PR adds support for
virtualizationOptions.onItemsRenderedas well asvirtualizationOptions.className(figured why not, since I was here). It also adds better documentation and type-checking for thevirtualizationOptionsprop.Checklist
- [ ] Checked in both light and dark modes- [ ] Checked in mobile- [ ] Checked in Chrome, Safari, Edge, and Firefox- [ ] Props have proper autodocs and playground toggles- [ ] Checked Code Sandbox works for any docs examples- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] Updated the Figma library counterpart